package com.pe.adexus.portal3g.componente;

import java.util.Comparator;

import com.pe.adexus.portal3g.bean.CuentaBean;

public class OrdenBolsaComparator implements Comparator{

	public int compare(Object o1, Object o2) {
		 CuentaBean u1 = (CuentaBean) o1;
		 CuentaBean u2 = (CuentaBean) o2;
		 int orden1 = 0;
		 int orden2 = 0;
		 try{  
			 
			 orden1 = u1.getOrden();
			orden2 = u2.getOrden();
			 
		 }catch(Exception e){
			 e.printStackTrace();
		 }
		 return orden1 - orden2;

	}

	public boolean equals(Object o) {
	return this == o;
	}
	
}
